<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1.接收用户输入的值
        var myName = prompt('请输入姓名：');
        var sno = prompt('请输入学号：');
        var myClass = prompt('请输入班级：');
        var sex = prompt('请输入性别：');
        var hobby = prompt('请输入爱好：');
        //2.在网页显示个人信息
        document.write('<h1 style="color:red">个人信息</h1>');
        document.write('<div style="color:#667788;font-size:24px">班级：'+myName+'</div>');
        document.write('<div style="color:#234566;font-size:24px">班级：'+sno+'</div>');
        document.write('<div style="color:#667788;font-size:24px">班级：'+myClass+'</div>');
        document.write('<div style="color:#667788;font-size:24px">班级：'+sex+'</div>');
        document.write('<div style="color:#667788;font-size:24px">班级：'+hobby+'</div>');
    </script>
</body>
</html>